<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<title>getSpacedPoints :: Functions (k-Wave)</title>
	<link rel="stylesheet" href="kwavehelpstyle.css" type="text/css">
</head>

<body>
<div class="content">

<h1>getSpacedPoints</h1>
<p class="purpose">Create vector of log or linear spaced points.</p>

<h2>Syntax</h2>

<pre class="codeinput">
points = getSpacedPoints(X1, X2)
points = getSpacedPoints(X1, X2, N)
points = getSpacedPoints(X1, X2, N, spacing)
</pre>

<h2>Description</h2>
<p><code>getSpacedPoints</code> generates a row vector of either logarithmically or linearly spaced points between <code>X1</code> and <code>X2</code>. When <code>spacing</code> is set to <code>'linear'</code>, the function is identical to the inbuilt <code><a href="matlab: doc linspace">linspace</a></code> function. When <code>spacing</code> is set to <code>'log'</code>, the function is similar to the inbuilt <code><a href="matlab: doc logspace">logspace</a></code> function, except that <code>X1</code> and <code>X2</code> define the start and end numbers, not decades. For logarithmically spaced points, <code>X1</code> must be > 0. If <code>N</code> < 2, <code>X2</code> is returned. </p>

<h2>Inputs</h2>

<table class="body">
    <tr valign="top">
        <td width = "150"><code>X1</code></td>
        <td>starting points value</td>
    </tr>
    <tr valign="top">
        <td><code>X2</code></td>
        <td>ending points value (where <code>X2</code> > <code>X1</code>)</td>        
    </tr>         
</table>

<h2>Optional Inputs</h2>

<table class="body">
    <tr valign="top">
        <td width = "150"><code>N</code></td>
        <td>number of points in the vector (default = 100)</td>        
    </tr>  
    <tr valign="top">
        <td><code>spacing</code></td>
        <td><code>'log'</code> or <code>'linear'</code> spaced values (default = <code>'linear'</code>)</td>        
    </tr>    
</table>

<h2>Outputs</h2>

<table class="body">
    <tr valign="top">
        <td width = "150"><code>points</code></td>
        <td>row vector of equally spaced points</td>
    </tr>
</table>

<h2>See Also</h2>

<code><a href="matlab: doc linspace">linspace</a></code>, <code><a href="matlab: doc logspace">logspace</a></code>




</div></body></html>